let mysql = require('mysql');
let connection = mysql.createPool({
  host: 'localhost',
  // host: '47.103.58.127',
  user: 'root',
  port: '3306',
  database: 'aptw',
  password: '15219095369',
  timezone: '+08.00', //东八时区
});

let query = function (sql, callBack) {
  connection.query(sql, (err, data) => {
    callBack(err, data);
  });
};

//数据连接配置
module.exports = { query };
